import React, { Component } from 'react';
import IceContainer from '@icedesign/container';
// import { Tab } from '@icedesign/base';
import TabSelect from '../../../../components/TabSelect/TabSelect';
import ProfitTable from './components/ProfitTable/ProfitTable'
import { GetUrlParam } from '../../../../baseConfig';

// const TabPane = Tab.TabPane;

export default class TabTable extends Component {
  static displayName = 'TabTable';

  static propTypes = {};

  static defaultProps = {};

  constructor(props) {
    super(props);
    // console.log("stockCode",this.props.stockCode)
    this.state = {
    };
  }

  render() {
    const tabs = [{
        tab: "利润表",
        key: 0
    },{
        tab: "现金流量表",
        key: 1
    },{
        tab: "资产负债表",
        key: 2
    }];
    let chartContent = [];
    for(let i=0;i<tabs.length;i++){
        chartContent.push((
            <div key={`Profit${i}`}>
                <ProfitTable key={`ProfitTable${i}`} stockCode={GetUrlParam("secu_code")} chartName={tabs[i].tab}/>
                {/* <Introduction stockCode={this.props.stock_code} chartName={tabs[i].tab}/> */}
            </div>
        ))
    }
    return (
    //   <div style={{padding:'0'}}>
        <IceContainer style={{borderRadius:'0'}}>
            <TabSelect tabs={tabs} content={chartContent}/>
        </IceContainer>
    //   </div>
    );
  }
}
